#!/bin/sh
cd /root
wget https://raw.githubusercontent.com/EngiGu/arukas-shell/master/a.sh
sed -i '1i\#!/bin/sh'  a.sh
chmod +x a.sh
clear
echo -e "\e[1;35m=============================================================\e[0m"
echo -e 
echo -e "\033[36m                      欢迎使用！\033[0m"
echo -e
echo -e "\033[36m           针对樱花服务器端口改变定时修复脚本        \033[0m"
echo -e "\033[36m                无形装逼，最为致命！\033[0m"
echo -e "\033[36m                            制作人:辛格     \033[0m"
echo -e "\033[36m                            制作时间:2016-12-30             \033[0m"

echo -e "\e[1;35m=============================================================\e[0m"
echo -e "\e[1;44m请输入设置的定时分钟数\e[0m"
read -p "(回车将设置时间为:30分钟):" m
[ -z "$m" ] && m="30"
echo 
        echo -e "---------------------------"
        echo -e "已设置定时为 = $m分钟"
        echo -e "---------------------------"
        echo -e
#yum install vixie-cron -y
#crontab -e $m * * * * /root/a.sh
#service crond start
echo "$m * * * * /root/a.sh" >> /var/spool/cron/root
echo -e "\e[1;35m=============================================================\e[0m"
echo -e "\033[36m                      请等待三秒...\033[0m"
echo -e "\e[1;35m=============================================================\e[0m"
sleep 3
clear
echo -e "\e[1;35m=============================================================\e[0m"
echo -e 
echo -e "\033[36m                      开启成功！\033[0m"
echo -e
echo -e "\033[36m           恭喜你服务器已设置定时为$m分钟！        \033[0m"
echo -e "\033[36m                一直在装逼，从未被打死！\033[0m"
echo -e "\033[36m                              By:辛格     \033[0m"
echo -e "\033[36m                              QQ:1577134779             \033[0m"
echo -e "\e[1;35m=============================================================\e[0m"
rm -f /root/ds.sh
